package org.hk.springMVC.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @ClassName: SpringConfig
 * @Date: 2025/7/11   23:04
 * @Description: spring配置类
 * @Author: hk
 */
@EnableTransactionManagement//使用事务管理器
@Configuration//表明此类是配置类
@ComponentScan({"org.hk.springMVC.service","org.hk.springMVC.bean"})//扫包
@PropertySource("classpath:jdbc.properties")//加载jdbc.properties文件
//导入DataSourceConfig.class和MyBatisConfig.class
@Import({DataSourceConfig.class, MyBatisConfig.class})
public class SpringConfig {
}